package com.hzit.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 *
 * @TableName emp
 */
@TableName(value ="emp")
@Data
@ApiModel(value = "员工实体",description = "员工信息")
public class Emp implements Serializable {
    /**
     *
     */
    @TableId
    @ApiModelProperty(value = "员工id")
    private String eid;

    /**
     *
     */
    @ApiModelProperty(value = "员工姓名")
    private String ename;

    /**
     *
     */
    @ApiModelProperty(value = "出生日期")
    private Date bdate;

    /**
     *
     */
    @ApiModelProperty(value = "员工性别")
    private String sex;

    /**
     *
     */
    @ApiModelProperty(value = "所城城市")
    private String city;

    /**
     *
     */
    @ApiModelProperty(value = "是否逻辑删除",allowEmptyValue = true)
    @TableLogic
    private Byte deleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Emp other = (Emp) that;
        return (this.getEid() == null ? other.getEid() == null : this.getEid().equals(other.getEid()))
            && (this.getEname() == null ? other.getEname() == null : this.getEname().equals(other.getEname()))
            && (this.getBdate() == null ? other.getBdate() == null : this.getBdate().equals(other.getBdate()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEid() == null) ? 0 : getEid().hashCode());
        result = prime * result + ((getEname() == null) ? 0 : getEname().hashCode());
        result = prime * result + ((getBdate() == null) ? 0 : getBdate().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", eid=").append(eid);
        sb.append(", ename=").append(ename);
        sb.append(", bdate=").append(bdate);
        sb.append(", sex=").append(sex);
        sb.append(", city=").append(city);
        sb.append(", deleted=").append(deleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
